<template>
<div>
  <h1>WorkbenchIndex</h1>
  <el-button @click="testGet">testGet</el-button>
  <el-button @click="testPost">testPost</el-button>
</div>
</template>

<script>
import { testGet, testPost } from '@/api/test/test'

export default {
  name: 'WorkbenchIndex.vue',
  methods: {
    testGet () {
      testGet({
        str: 'get测试文本'
      }).then(res => {
        alert(res.message)
      })
    },
    testPost () {
      testPost({
        str: 'post测试文本'
      }).then(res => {
        alert(res.data.str)
      })
    }
  }
}
</script>

<style scoped>

</style>
